package com.github.admin.edu.security.jwt.server.entity;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

/**
 * Create by IntelliJ IDEA
 * 用户：王建
 * 日期：2018-8-30
 */
@Entity
@Table(name = "t_sys_role_step")
public class TSysRoleStep implements Serializable {

    private Integer stepid;
    private String roleid;
    private String userid;
    private String orgid;
    private Long id;

    @Basic
    @Column(name = "stepid")
    public Integer getStepid() {
        return stepid;
    }

    public void setStepid(Integer stepid) {
        this.stepid = stepid;
    }

    @Basic
    @Column(name = "roleid")
    public String getRoleid() {
        return roleid;
    }

    public void setRoleid(String roleid) {
        this.roleid = roleid;
    }

    @Basic
    @Column(name = "userid")
    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    @Basic
    @Column(name = "orgid")
    public String getOrgid() {
        return orgid;
    }

    public void setOrgid(String orgid) {
        this.orgid = orgid;
    }

    @Id
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TSysRoleStep that = (TSysRoleStep) o;
        return Objects.equals(stepid, that.stepid) &&
                Objects.equals(roleid, that.roleid) &&
                Objects.equals(userid, that.userid) &&
                Objects.equals(orgid, that.orgid) &&
                Objects.equals(id, that.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(stepid, roleid, userid, orgid, id);
    }
}
